package com.joy.educms.controller;

import com.joy.commonutils.R;
import com.joy.educms.entity.CrmBanner;
import com.joy.educms.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 焦恩越
 * @create 2021-12-06-15:28
 */
@RestController
@RequestMapping("/educms/bannerfront")
@CrossOrigin
public class BannerFrontController {
    //查询所有幻灯片的方法
    @Autowired
    private CrmBannerService crmBannerService;


    //查询所有的banner
    @GetMapping("/getAllBanner")
    public R getAllBanner(){

        List<CrmBanner> list = crmBannerService.selectAllBanner();

        return R.ok().data("list",list);
    }



}
